Skip to content

Conversation

peterfriese
Copy link
Contributor

Add AsyncSequence support for Firestore

This change introduces support for AsyncSequence to DocumentReference and Query, allowing developers to use for await in to receive real-time updates from Firestore.

The implementation wraps the existing snapshot listener APIs in an AsyncThrowingStream, providing a modern, Swift-native way to work with real-time data.

This change also includes unit tests for the new functionality.

This change introduces support for `AsyncSequence` to `DocumentReference` and `Query`, allowing developers to use `for await in` to receive real-time updates from Firestore.

The implementation wraps the existing snapshot listener APIs in an `AsyncThrowingStream`, providing a modern, Swift-native way to work with real-time data.

This change also includes unit tests for the new functionality.
@peterfriese peterfriese linked an issue Sep 28, 2025 that may be closed by this pull request
@peterfriese peterfriese self-assigned this Sep 28, 2025
@peterfriese peterfriese marked this pull request as ready for review September 30, 2025 10:04
@peterfriese peterfriese requested a review from ncooke3 September 30, 2025 10:04
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests don't appear to be running when I reproduced the xcodebuild job locally. I'm still debugging with the goal of adding a small SPM based unit test target.

@ncooke3 ncooke3 self-assigned this Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement AsyncStream support for Cloud Firestore
3 participants